#ifndef AVALON_NULLCLIENTCONNECTION_HPP
#define AVALON_NULLCLIENTCONNECTION_HPP
#include "Avalon/IO/ClientConnection.hpp"
#include "Avalon/IOTests/IOTests.hpp"

namespace Avalon {
namespace IO {
namespace Tests {

  /** \class NullClientConnection
   *  \brief A ClientConnection that doesn't connect to any server.
   */
  class NullClientConnection : public ClientConnection {
    public:

      //! Constructs a NullClientConnection.
      NullClientConnection();

      virtual ~NullClientConnection();

      virtual void Open();

      virtual bool IsOpen() const;

      virtual void Close();

      virtual void SetClosedSlot(const ClosedSlot& slot, Out<bool> isOpen);

    private:
      mutable boost::mutex m_mutex;
      bool m_isOpen;
      boost::shared_ptr<ClosedSlot> m_closedSlot;
  };
}
}
}

#endif // AVALON_NULLCLIENTCONNECTION_HPP
